1. Field of the Invention
The present invention relates to a semiconductor device having a debugging function, and more particularly, to a debug control in the semiconductor device having a plurality of chips containing a processing unit, and a nonvolatile memory, and containing also a processing unit and a RAM for instruction storing (instruction RAM).
2. Description of Related Art
When debugging a semiconductor device by connecting an on-chip debugger thereto, the technique of preventing leakage of data is developed. For example, an on-chip debugger is disclosed in Japanese Laid-Open Patent Application No. 2003-186693 in which leakage of an internally stored program or data is prevented with certainty by a simple system when debugging a semiconductor device by connecting JTAG-I CE thereto. In this invention, outputting internal data outside is permitted only when an access key stored inside the semiconductor device is compared with an access key inputted from the outside and the two keys agree each other. By this system, the leakage of the data to a third party is prevented including an internally stored program.
In recent years, an assembling technique has progressed for semiconductor devices such as a system LSI, (Large Scale Integration) etc., and a product containing a plurality of chips in one package appeared. When a chip containing an instruction RAM (Random Access Memory) is mounted on this system LSI, there is a demand for preventing the leakage of the control program from the chip.
As a merit of using the chip containing an instruction RAM is alterations are made freely if needed compared with a Mask ROM (Read Only Memory), for which a control program must be coded beforehand, since the program is downloaded from the outside and stored in the RAM. Therefore, a change of a program is easily performed allowing any change possible, since the program is downloaded externally and modified, if necessary. As another merit of this RAM, a high-speed operation can be implemented compared with a mask ROM or a rewritable nonvolatile memory (flash memory). Furthermore, a RAM can be manufactured by a comparatively cheap process compared with a flash memory resulting in a low cost, which is also a merit for a supplier side.
However, there is a disadvantage in respect of security reservation of a program, since the system is configured such that a control program is downloaded from the outside and operated. Even though the data leakage is prevented during downloading, a downloaded program will be read out if memory is referred to from a debugger (debugger), after the completion of downloading. There is another problem such that even if the connection of a debugger to the semiconductor device is prohibited, and an access key is used as in the conventional technique, then there is no place for storing the access key because no nonvolatile memory is provided in the system. Here, it is necessary for an access key to be stored in a place where a program developer can access (setup) but a third party meet a difficulty with decoding the setup, and there is also an example in which the key is stored in the interior of a nonvolatile memory
Therefore, the debugger function itself is made private for the chip containing the instruction RAM, and as a result decrease in program development efficiency or difficulties with fault analysis are caused. For such a chip and a debugger, realization of the above-mentioned merit has priority, and the protection of a program is given up, and an arrangement is not made for the prevention of the third party from illegal connection, such as a verification function of an access key, in many cases.
An example of a semiconductor device 90 (system LSI) with a plurality of chips are mounted thereon mentioned above is shown in FIG. 6, as a related art. FIG. 6 shows a product which stores a built-in chip A19 (for example, DSP: Digital Signal Processor) containing an instruction RAM, and a built-in chip B29 (for example, microcomputer) containing a nonvolatile memory. A dedicated debugger can be connected to each of the built-in chips A and B here, the control program of the built-in chip A19 is stored in the nonvolatile memory of the built-in chip B29, and downloaded with a unit to be provided when the built-in chip A19 is started. An operation flow is shown in FIG. 7. Concerning the control of the debugger connection by the built-in chip B29 containing the nonvolatile memory, security is secured by using the access key mentioned above. On the other hand, about the built-in chip A19 since downloading of a control program is performed inside a system LSI (S83-S86, S91-S94), there is no concern about the leakage, but when a debugger is connected, there is a risk of the leakage to a third party as mentioned above.
In order to be able to prevent leakage of a control program and to perform efficient debugging to the built-in chip A19 of such a system LSI, a debugger control unit is required to be able to specify permission/prohibition of the debugger connection by a third party.
However, it has not been taken into account that a plurality of chips are mounted on one package in such technology. Therefore, reference has not been made to effective control of debugging connection when a plurality of chips with a debugging function are mounted on one package. Especially when one of plurality of chips does not have a scheme of securing the security of a program at the time of debugging connection, for example, a security guarantee has to be given up for a chip with an instruction RAM mounted thereon.
Since the conventional debugger connection permission/prohibition control is performed such that a release code is inputted from the debugger side, collated with an access key stored in the interior, and a matching/mismatching judgment is made, so that hardware such as an access key register and a resource access circuit has to be increased, and the control software for the debugger becomes complicated.
When diverting the existing design property, especially diverting a built-in chip A19 with an instruction RAM mounted and an on-chip debugger, there is a request that a change accompanied by introduction of a debugger control unit be kept minimum.
Furthermore, when the debugging function itself is made private in order to prevent the leakage of the control program (instruction code) of the built-in chip A19 without controlling the debugger connection, decrease in program development efficiency or difficulties with fault analysis are caused.
Thus, there is a need of realizing the security function to prevent a third party from obtaining data illegally with using a debugger function in the semiconductor device containing the chip with a volatile memory (for example, RAM for storing instructions) mounted.